<root xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:include href="rds.html" />

<report>
    <?python preorder = model.Preorder.get(preorder_id) ?>

            <order py:if="order_id == 0">
                <id>*</id>
                <creationDate py:content="preorder.creationDate" />
            </order>

            <order py:if="order_id != 0">
                <?python order = model.Order.get(order_id) ?>

                <id py:content="order.id" />
                <creationDate py:content="order.creationDate" />
            </order>

            <students>
                <student py:for="t in model.PreorderEndEducationData.selectBy(preorder=preorder)">
                    <student py:content="t.student.title" />

                    <regnumber py:if="order_id == 0">
                        *
                    </regnumber>

                    <regnumber py:if="order_id != 0" />
                </student>
            </students>
</report>

</root>
